<template>
    <div class="header">
        <el-row>
            <el-col :span="6">
        <span class="headerImg">
          <img src="" alt="">
        </span>
            </el-col>
            <el-col :span="18">
                <el-col :span="16" class="headerText">
                    <el-col :span="4"><router-link to="/home" exact>首页</router-link></el-col>
                    <el-col :span="4"><router-link to="/" exact>分类</router-link></el-col>
                    <el-col :span="4"> <router-link to="/" exact>排行</router-link></el-col>
                    <el-col :span="4"> <router-link to="/" exact>企业阅读</router-link></el-col>
                    <el-col :span="4"> <router-link to="/" exact>征文大赛</router-link></el-col>
                    <el-col :span="4"> <router-link to="/" exact>下载</router-link></el-col>
                </el-col>
                <el-col :span="8">
                    <el-col :span="16" class="headerInput">
                        <el-input placeholder="书名/作者名" suffix-icon="el-icon-search" v-model="input1" @change="search"></el-input>
                    </el-col>
                    <el-col :span="8">
                        <el-button @click="goLogin()">登录</el-button>
                    </el-col>
                </el-col>
            </el-col>
        </el-row>
    </div>
</template>
<script>
    export default {
        name: "Header",
        data() {
            return {
                input1: '',
            }
        },
        methods: {
            search() {
                this.$router.push({path: '/search', query: {name: this.input1}})
            },
            goLogin(){
                this.$router.push({path: '/login'})
            }
        }
    }
</script>

<style scoped>
    .header {
        width: 1000px;
        height: 70px;
        line-height: 70px;
        margin: 0 auto;
        padding: 0;
    }

    .header div {
        height: 70px;
    }

    .headerImg {
        width: 160px;
        display: inline-block;
        margin-top: 10px;
    }

    .headerImg img {
        width: 100%;
    }

    .headerText {
        font-size: 14px;
    }

    .headerText div:hover {
        color: #f26552;
    }

    .headerInput div {
        height: 28px;
        line-height: 28px;
        color: #9e9e9e;
        font-size: 12px;
    }

    .headerInput div input {
        border-radius: 50px !important;
    }
</style>
